package databases

import (
	"fly_export/global"

	"gorm.io/driver/mysql"
	"gorm.io/gorm"
)

func NewMysql() {
	var err error
	global.GVA_MYSQL, err = gorm.Open(mysql.Open(global.GVA_CONFIG.Mysql.Dsn), &gorm.Config{})
	if err != nil {
		panic(err)
	}
	global.GVA_MYSQL.AutoMigrate(&Alert{})
}
